// Check a link's popularity with Socialmeter.
// version 1.0
// 2006-08-20
// Copyright (c) 2006, Calvin Yu
//
// --------------------------------------------------------------------
//
// This is a Tails script.
//
// To install, you need Tails: http://blog.codeeg.com/tails-firefox-extension/
// Then restart Firefox and revisit this script and click on 'Install'.
//
// To uninstall, go to Tools/Manage Tails Scripts...,
// select "Socialmeter Report", and click Uninstall.
//
// --------------------------------------------------------------------
//
// ==TailsScript==
// @name          Socialmeter Report
// @namespace     http://blog.codeeg.com/tails-firefox-extension-03
// @description   Check a link's popularity with socialmeter.
// @include       xfolk
// @include       hfeed
// @include       hcard
// ==/TailsScript==

getURL: function() {
  var url = null;
  if (this.object.__name == 'xfolk') {
    url = this.object.taggedlink.url;
  } else if (this.object.__name == 'hfeed' && this.object.bookmark) {
    url = this.object.bookmark;
  } else if (this.object.__name == 'hcard' && this.object.url) {
    url = this.object.url;
  }
  if (url) {
    return "http://www.socialmeter.com/check?url=" + url;
  }
}
